package com.druid.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;

@SuppressWarnings("Lombok")
@Data
@ApiModel(description = "管理员用户请求参数实体对象")
public class AdminUserParam extends PageParam {

    @ApiModelProperty(value = "用户id")
    @NotNull(groups = {RequestParamInterfaceGroup.DeleteGroup.class,RequestParamInterfaceGroup.UpdateGroupSomeOne.class})
    private Integer id;

    @ApiModelProperty(value = "用户名称")
    @Length(min = 4,message = "用户名长度不少于4位",groups = RequestParamInterfaceGroup.InsertGroup.class)
    @NotNull(message = "用户名称不能为空", groups = RequestParamInterfaceGroup.SelectGroupSomeOne.class)
    private String username;

    @ApiModelProperty(value = "用户密码")
    @Length(min = 6,message = "密码长度不少于6位",groups = RequestParamInterfaceGroup.InsertGroup.class )
    @NotNull(message = "密码不能为空", groups = RequestParamInterfaceGroup.SelectGroupSomeOne.class )
    private String password;

    @ApiModelProperty(value = "用户邮箱")
    @Email(groups = RequestParamInterfaceGroup.InsertGroup.class)
    private String email;

    @ApiModelProperty(value = "角色id")
    private Integer roleId =1;

    @ApiModelProperty(value = "是否激活0-否；1-是")
    @NotNull(groups = {RequestParamInterfaceGroup.InsertGroup.class,RequestParamInterfaceGroup.UpdateGroupSomeOne.class})
    private Boolean status;

}
